package com.aodesoft.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.directwebremoting.annotations.DataTransferObject;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * Demo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "demo")
@DataTransferObject
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Demo implements java.io.Serializable {

	private static final long serialVersionUID = -6735827008110764500L;
	private Integer id;
	private String title;
	private String content;

	// Constructors

	/** default constructor */
	public Demo() {
	}
	public Demo(int id) {
		this.id=id;
	}
	
	/** full constructor */
	public Demo(String title, String content) {
		this.title = title;
		this.content = content;
	}
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "title")
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "content")
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}